Accusoft.PdfXpress5.ActiveX
Convert PDF to Image
See Also Send Feedback
PDF Xpress 5 for ActiveX - User Guide > How To > Convert PDF to Image

Glossary Item Box

To render a page of a PDF document to bitmap, dib, encapsulated postscript, or data, use the "RenderPage" methods: RenderPageOptionsToBitmap, RenderPageOptionsToDib, RenderPageOptionsToEPS, and RenderPageOptionsToData.

PDF Xpress™ does not offer native compression or decompression of image streams used to populate PDF pages. ImagXpress® can be used in conjunction with PDF Xpress to provide image compression, decompression, and format conversion.

VB Example Copy Code
'This code demonstrates converting a PDF to an image 
On Error GoTo error
Dim imagXpress1 As New ImagXpress
Dim pdfXpress1 As  New PdfXpress
pdfXpress1.Initialize
pdfxpress1.RaiseExceptions = True
Dim document As New PdfDocument
document. SetParentControl pdfXpress1
document.OpenDocument "C:\test.pdf",""
Dim renderOpts As New RenderOptions
renderOpts.ProduceDibSection = False
imagXpress1.hDIB = document. RenderPageOptionsToDib(0, renderOpts)
.
.
.
GoTo finish
error:
MsgBox Err.Description 
finish:

Set document = Nothing
pdfxpress1.Terminate
Set pdfxpress1= Nothing

When rendering an image at a high resolution, a "Creation of rasterizer port failed" exception may occur. If this exception occurs, lower the resolution and attempt to render the page again.

See Also

©2012. Accusoft Corporation. All Rights Reserved.